<%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2021/1/25
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    //session.setAttribute("visitNum",1);
    Integer i=(Integer)session.getAttribute("visitNum");
    if(i==null){
        i=1;
    }else{
        i++;
    }
    session.setAttribute("visitNum",i);
%>
<h1>访问了<%=i%>次</h1>
</body>
</html>
